package com.zhf.fm.constant;

import java.util.HashMap;
import java.util.Map;

/**
 * @author: 曾鸿发
 * @create: 2021-11-22 13:34
 * @description：
 **/
public enum  EShiftType {
    morning("早班"),
    evening("晚班");

    private String value;
    EShiftType(String value){
        this.value = value;
    }

    public String getValue() {
        return value;
    }


    private static Map<String,String> lis = null;
    public static EShiftType getShiftType(String value){
        if(lis==null){
            lis = new HashMap<>();
            lis.put("早班","morning");
            lis.put("晚班","evening");
        }
        String tpStr = lis.get(value);
        if(tpStr==null){
            return null;
        }else{
            return EShiftType.valueOf(tpStr);
        }
    }
}